Georges Basile Stavracas Neto [Thu, 28 Mar 2019 01:55:07 +0000 (22:55 -0300)]
build: Install gtkboxlayout.h
This is included by gtk.h, and thus required to build.
Matthias Clasen [Thu, 28 Mar 2019 00:14:51 +0000 (00:14 +0000)]
Merge branch 'window-api-cleanup' into 'master'
GtkWindow api cleanup
See merge request GNOME/gtk!674
Matthias Clasen [Wed, 27 Mar 2019 22:48:59 +0000 (18:48 -0400)]
win32: Drop set_role
One overlooked (non-)implementation of set_role.
Matthias Clasen [Wed, 27 Mar 2019 22:47:56 +0000 (18:47 -0400)]
win32: Add a missing include
We are using round() now, so include math.h.
Matthias Clasen [Wed, 27 Mar 2019 21:15:26 +0000 (17:15 -0400)]
gdk: Drop gdk_surface_set_role
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
Matthias Clasen [Wed, 27 Mar 2019 21:14:33 +0000 (17:14 -0400)]
gdk: Stop implementing set_role
All but the X implementation of these were
empty anyway. And the X one is just setting
a property.
Matthias Clasen [Wed, 27 Mar 2019 21:03:45 +0000 (17:03 -0400)]
Remove GtkWindow::role
...and the setter/getter for it.
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
Matthias Clasen [Wed, 27 Mar 2019 21:28:53 +0000 (17:28 -0400)]
file chooser: Stop setting a role
It does nothing.
Matthias Clasen [Wed, 27 Mar 2019 18:51:04 +0000 (18:51 +0000)]
Merge branch 'fixed-layout' into 'master'
Add GtkFixedLayout
See merge request GNOME/gtk!668
Alexander Larsson [Wed, 27 Mar 2019 18:45:17 +0000 (18:45 +0000)]
Merge branch 'wip/alexl/broadway6' into 'master'
broadway: Use css transforms
See merge request GNOME/gtk!673
Alexander Larsson [Wed, 27 Mar 2019 18:27:16 +0000 (19:27 +0100)]
broadway: Use css transforms
This allows generic transforms nodes to work.
Matthias Clasen [Wed, 27 Mar 2019 18:21:26 +0000 (14:21 -0400)]
migration guide: Improve warp-pointer entry
Mention platform APIs.
Matthias Clasen [Wed, 27 Mar 2019 18:12:01 +0000 (18:12 +0000)]
Merge branch 'pack-type' into 'master'
Drop some more child properties
See merge request GNOME/gtk!672
Matthias Clasen [Wed, 27 Mar 2019 17:52:47 +0000 (13:52 -0400)]
Mention pack-type in the migration guide
Matthias Clasen [Wed, 27 Mar 2019 17:20:18 +0000 (13:20 -0400)]
Convert all ui files
Run gtk4-builder-tool simplify --3to4 over all ui files.
Matthias Clasen [Wed, 27 Mar 2019 17:14:39 +0000 (13:14 -0400)]
builder-tool: Rewrite pack-type
Replace GtkActionBar::pack-type and GtHeaderBar::pack-type
with child types when going from 3 to 4.
Matthias Clasen [Wed, 27 Mar 2019 17:16:07 +0000 (13:16 -0400)]
action bar: Drop pack-type
Drop the pack-type child property. Allow ui
files to direct children by adding a child
type for it.
Matthias Clasen [Wed, 27 Mar 2019 17:16:49 +0000 (13:16 -0400)]
header bar: Drop pack-type
Drop the pack-type child property. Allow ui files
to direct children by adding a child type.
Matthias Clasen [Wed, 27 Mar 2019 17:35:38 +0000 (13:35 -0400)]
dialog: Stop using GtkHeaderBar::pack-type
We want to get rid of child properties.
Alexander Larsson [Wed, 27 Mar 2019 13:21:28 +0000 (14:21 +0100)]
broadway: Fix leftover dom modification not using display_commands
Matthias Clasen [Wed, 27 Mar 2019 06:18:36 +0000 (02:18 -0400)]
Migration guide: Updates
Matthias Clasen [Wed, 27 Mar 2019 05:55:06 +0000 (05:55 +0000)]
Merge branch 'entry-sizing' into 'master'
Entry sizing
Closes #1721
See merge request GNOME/gtk!670
Matthias Clasen [Wed, 27 Mar 2019 05:40:17 +0000 (01:40 -0400)]
text: Allow growing entries
Add a propagate-text-width property, which, when set,
makes the entry request a natural width that is just
enough to fit the content, within the limits given
by width-chars and max-width-chars.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1721
Matthias Clasen [Wed, 27 Mar 2019 04:22:32 +0000 (00:22 -0400)]
search entry: Fix sizing
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
search entries don't change size as icons come
and go.
Matthias Clasen [Wed, 27 Mar 2019 04:21:11 +0000 (00:21 -0400)]
password entry: Fix sizing
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
password entries don't change size as icons come
and go.
Matthias Clasen [Tue, 26 Mar 2019 23:14:48 +0000 (23:14 +0000)]
Merge branch 'get_caret_offset_negative_one' into 'master'
Return -1 for AtkText::get_caret_offset on failure
See merge request GNOME/gtk!666
Matthias Clasen [Tue, 26 Mar 2019 22:37:27 +0000 (22:37 +0000)]
Merge branch 'gdk-api-cleanups' into 'master'
Gdk api cleanups
See merge request GNOME/gtk!669
Matthias Clasen [Tue, 26 Mar 2019 00:44:37 +0000 (20:44 -0400)]
Rename gdk_device_get_surface_at_position_double
We can drop the double suffix now.
Matthias Clasen [Tue, 26 Mar 2019 00:39:08 +0000 (20:39 -0400)]
Drop gdk_device_get_surface_at_position
It is no longer used.
Matthias Clasen [Tue, 26 Mar 2019 00:37:13 +0000 (20:37 -0400)]
gtk: Stop using gtk_device_get_surface_at_position
We should always use the double variant of the api.
Matthias Clasen [Tue, 26 Mar 2019 00:36:45 +0000 (20:36 -0400)]
gdk: Stop using gdk_device_get_surface_at_position
We should always use the double variant.
Matthias Clasen [Tue, 26 Mar 2019 00:30:15 +0000 (20:30 -0400)]
Rename gdk_device_get_position_double
We can drop the double suffix now.
Matthias Clasen [Tue, 26 Mar 2019 00:28:08 +0000 (20:28 -0400)]
Drop gdk_device_get_position
It is no longer used.
Matthias Clasen [Tue, 26 Mar 2019 00:26:59 +0000 (20:26 -0400)]
gtk: Stop using gdk_device_get_position
We should always use the double variant of this api.
Matthias Clasen [Tue, 26 Mar 2019 00:26:34 +0000 (20:26 -0400)]
gdk: Stop using gdk_device_get_position
We should always use the double variant of this api.
Matthias Clasen [Mon, 25 Mar 2019 14:12:01 +0000 (10:12 -0400)]
Rename gdk_surface_get_device_position_double
Drop the _double suffix, now that the int version is gone.
Matthias Clasen [Mon, 25 Mar 2019 12:33:56 +0000 (08:33 -0400)]
Drop gdk_surface_get_device_position
Not used anymore.
Matthias Clasen [Mon, 25 Mar 2019 12:32:50 +0000 (08:32 -0400)]
gtk: Stop using gdk_surface_get_device_position
Use the double version directly.
Matthias Clasen [Mon, 25 Mar 2019 12:32:10 +0000 (08:32 -0400)]
gdk: Stop using gdk_surface_get_device_position
Use the double variant instead.
Matthias Clasen [Mon, 25 Mar 2019 02:09:30 +0000 (22:09 -0400)]
Remove GtkWindow::gravity
This was used to interpret the position passed
to gtk_window_move. Since that is gone, gravity
is no longer useful.
Matthias Clasen [Mon, 25 Mar 2019 01:50:51 +0000 (21:50 -0400)]
tests: Stop using gtk_window_set_gravity
This api is going away.
Matthias Clasen [Mon, 25 Mar 2019 01:46:30 +0000 (21:46 -0400)]
Drop gtk_window_move and gtk_window_get_position
These functions operate with global coordinates,
which are not available on Wayland.
Matthias Clasen [Mon, 25 Mar 2019 01:45:31 +0000 (21:45 -0400)]
treeview: Stop using gtk_window_move
It is going away. The search popup needs to be
redone using popovers.
Matthias Clasen [Mon, 25 Mar 2019 01:45:09 +0000 (21:45 -0400)]
file chooser: Stop using gtk_window_get_position
It is going away.
Matthias Clasen [Mon, 25 Mar 2019 01:44:31 +0000 (21:44 -0400)]
tests: Stop using gtk_window_move
It is going away.
Matthias Clasen [Tue, 26 Mar 2019 21:37:12 +0000 (17:37 -0400)]
a11y: Don't support changing widget size and position
This does not make sense.
Matthias Clasen [Sat, 23 Mar 2019 18:56:21 +0000 (14:56 -0400)]
Avoid root coordinates in begin_drag/move apis
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.
Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
Matthias Clasen [Sun, 24 Mar 2019 14:52:42 +0000 (10:52 -0400)]
Add a window move/resize test
Emmanuele Bassi [Tue, 26 Mar 2019 19:17:26 +0000 (19:17 +0000)]
Turn GtkFixedLayoutChild:position into a transformation
This way we can transform children instead of just allocating them at an
offset.
Emmanuele Bassi [Tue, 26 Mar 2019 18:05:48 +0000 (18:05 +0000)]
Skip all LayoutChild when testing
GtkLayoutChild instances are created on demand once we have a widget, a
GtkLayoutManager, and a child widget. This makes testing their creation
fairly tricky.
Let's skip them, for the time being.
Emmanuele Bassi [Tue, 26 Mar 2019 16:50:30 +0000 (16:50 +0000)]
Use GtkFixedLayout in GtkFixed
Drop the child properties and the sizing code.
Emmanuele Bassi [Tue, 26 Mar 2019 16:50:13 +0000 (16:50 +0000)]
Add GtkFixedLayout
A layout manager for fixed positioning.
Emmanuele Bassi [Tue, 26 Mar 2019 17:13:18 +0000 (17:13 +0000)]
Do not connect to a non-existing signal
The GtkWidget::parent-set signal was removed in
ff6cd8f7.
Instead of removing GtkLayoutChild instances associated to a widget
using notifications when the widget's parent changes, we can have
gtk_widget_unparent() call a method on GtkLayoutManager to remove any
eventual GtkLayoutChild instances associated to the widget.
Emmanuele Bassi [Tue, 26 Mar 2019 17:12:21 +0000 (17:12 +0000)]
Drop warning from GtkLayoutManager::get_request_mode()
We can return a sensible default value, so we don't really need to warn
about a missing implementation.
Piotr Drąg [Tue, 26 Mar 2019 17:36:51 +0000 (18:36 +0100)]
Update POTFILES.in
Alexander Larsson [Tue, 26 Mar 2019 16:25:10 +0000 (16:25 +0000)]
Merge branch 'wip/alexl/broadway5' into 'master'
Update broadway for gtk4
See merge request GNOME/gtk!667
Alexander Larsson [Tue, 26 Mar 2019 16:09:41 +0000 (17:09 +0100)]
broadway: Remove some spew
Alexander Larsson [Tue, 26 Mar 2019 15:29:45 +0000 (16:29 +0100)]
broadway: Load all textures before applying display ops, fixing flickers
Alexander Larsson [Tue, 26 Mar 2019 10:19:08 +0000 (11:19 +0100)]
broadway: Use const use for constants in the js code
Alexander Larsson [Mon, 25 Mar 2019 15:21:34 +0000 (16:21 +0100)]
broadway: Clean up stuff using const defines
Alexander Larsson [Mon, 25 Mar 2019 13:15:49 +0000 (14:15 +0100)]
Broadway: Add id for nodes and reuse old ones
When sending render nodes from the client to the daemon we add an id,
and whenever we're about to re-send the entire tree node we instead
send the old id. We track all the nodes for the previous frame
of the surface this way.
Having the id on the daemon side will allow us do to much better deltas.
Alexander Larsson [Mon, 25 Mar 2019 09:49:58 +0000 (10:49 +0100)]
Disable accidental debug spew
Alexander Larsson [Fri, 22 Mar 2019 18:55:22 +0000 (19:55 +0100)]
broadway: Prepare for splitting display ops out of command handling
Alexander Larsson [Fri, 22 Mar 2019 15:41:19 +0000 (16:41 +0100)]
broadway: Refcount textures
We want to delay some rendering, and to make that safe we need to correctly
refcount the use of blob uris for the textures so that we don't unref
it while something is scheduled to use it.
Alexander Larsson [Fri, 22 Mar 2019 14:29:24 +0000 (15:29 +0100)]
broadway: Simplify fallback node cache
Since nodes are now cached we just store the fallback as a
texture in a hashtable indexed by the node. If its unused for
5 frames we drop it.
Alexander Larsson [Fri, 22 Mar 2019 12:52:08 +0000 (13:52 +0100)]
broadway: Don't crash of drag-resizing when already active
This is what the X11 code does.
Alexander Larsson [Fri, 22 Mar 2019 12:42:26 +0000 (13:42 +0100)]
broadway: Send actual float32, not some hack
Alexander Larsson [Fri, 22 Mar 2019 12:38:19 +0000 (13:38 +0100)]
broadway: Use DataView instead of hand-rolled int parsers
This is nicer in general, but also will let us do floats more sanely.
Alexander Larsson [Fri, 22 Mar 2019 11:42:12 +0000 (12:42 +0100)]
Broadway: Add node for debug nodes
This can be helpful when debugging broadway.
Alexander Larsson [Fri, 22 Mar 2019 09:02:18 +0000 (10:02 +0100)]
broadway: Don't fall back for translation transform nodes
These are trivial anyway
Christoph Reiter [Tue, 26 Mar 2019 15:37:22 +0000 (16:37 +0100)]
CI: set a timeout multiplier for the tests
CI can be slower than your normal dev machine so give it a bit more time
Martin Robinson [Tue, 26 Mar 2019 14:28:03 +0000 (15:28 +0100)]
Return -1 for AtkText::get_caret_offset on failure
ATK now expects this virtual method to return -1 on failure. This allows
ATs to distinguish between a caret at position 0 and a failure.
Matthias Clasen [Tue, 26 Mar 2019 12:38:18 +0000 (12:38 +0000)]
Merge branch 'wip/layout-manager' into 'master'
Add Layout Managers
See merge request GNOME/gtk!534
Christoph Reiter [Tue, 26 Mar 2019 07:19:42 +0000 (08:19 +0100)]
win32: remove another call to gdk_device_warp()
Inline the implementation (untested). To fix the build.
Christoph Reiter [Tue, 26 Mar 2019 06:59:01 +0000 (07:59 +0100)]
win32: remove unused gdk_display_warp_device
to fix the build
Matthias Clasen [Tue, 26 Mar 2019 03:29:34 +0000 (23:29 -0400)]
Yet another win32 build fix
So much empty warping.
Emmanuele Bassi [Wed, 20 Mar 2019 15:37:15 +0000 (15:37 +0000)]
Changes after review
- Rename GtkLegacyLayout to GtkCustomLayout
- Use for() to iterate over children in GtkBinLayout
- Whitespace fixes for code imported from GtkBox
- Store the GtkLayoutChild instances inside LayoutManager
- Simplify the GtkLayoutManager API by dropping unnecessary arguments
- Fix the ownership model of GtkLayoutManager
Emmanuele Bassi [Mon, 4 Mar 2019 13:15:19 +0000 (13:15 +0000)]
Parse layout properties
If a widget has a LayoutManager instance, then we want to parse layout
properties in UI description files; the grammar is similar to packing
properties in GtkContainer:
<child>
<object ...>
<property name="...">...</property>
<layout>
<property name="pname">value</property>
</layout>
</object>
</child>
The properties are applied after a child has been added to its parent,
to the parent's layout manager property should be set.
Emmanuele Bassi [Mon, 4 Mar 2019 15:03:34 +0000 (15:03 +0000)]
Add GtkBinLayout
Like GtkBin, but lets you lay out multiple children instead of just one.
Emmanuele Bassi [Mon, 4 Mar 2019 13:36:52 +0000 (13:36 +0000)]
Port GtkSwitch to GtkLegacyLayout
Emmanuele Bassi [Mon, 28 Jan 2019 14:03:25 +0000 (14:03 +0000)]
Add GtkLegacyLayout
GtkLegacyLayout is a layout manager for the transitional period between
the introduction of layout managers and the removal of GtkWidget virtual
functions for the size negotiation.
Emmanuele Bassi [Fri, 25 Jan 2019 12:30:51 +0000 (12:30 +0000)]
docs: Add chapter on layout managers
Emmanuele Bassi [Fri, 25 Jan 2019 12:19:34 +0000 (12:19 +0000)]
Port GtkBox to GtkBoxLayout
We can delegate all the layout management to a GtkBoxLayout, now that we
have one.
Emmanuele Bassi [Wed, 19 Dec 2018 17:32:24 +0000 (17:32 +0000)]
Add GtkBoxLayout
The same layout policy of GtkBox, without all the GtkContainer calories.
Emmanuele Bassi [Wed, 19 Dec 2018 16:01:17 +0000 (16:01 +0000)]
Add GtkLayoutChild
Layout managers needs a way to store properties that control the layout
policy of a widget; typically, we used to store these in GtkContainer's
child properties, but since GtkLayoutManager is decoupled from the
actual container widget, we need a separate storage. Additionally, child
properties have their own downsides, like requiring a separate, global
GParamSpecPool storage, and additional lookup API.
GtkLayoutChild is a simple GObject class, which means you can introspect
and document it as you would any other type.
Emmanuele Bassi [Wed, 19 Dec 2018 16:04:05 +0000 (16:04 +0000)]
Rename the internal GtkLayoutChild type
The type is completely private to GtkLayout, so there's really no need
to namespace it.
Emmanuele Bassi [Thu, 13 Dec 2018 14:04:00 +0000 (14:04 +0000)]
Add GtkWidget:layout-manager
We can use a constructor property for existing container widgets with
a layout policy, and move the layout policy implementation out of the
widget itself and into a LayoutManager subclass.
Emmanuele Bassi [Wed, 12 Dec 2018 17:20:28 +0000 (17:20 +0000)]
Hook GtkLayoutManager into GtkWidget
We delegate the size request mode, the measuring, and the allocation of
a widget through a GtkLayoutManager instance, if one has been attached
to the widget; otherwise, we fall back to the widget's own implementation.
Emmanuele Bassi [Wed, 12 Dec 2018 15:24:41 +0000 (15:24 +0000)]
Add GtkLayoutManager
A base abstract class for layout manager delegate objects.
Layout managers are associated to a single widget, like event
controllers, and are responsible for measuring and allocating the
children of the widget they are bound to.
Matthias Clasen [Tue, 26 Mar 2019 00:05:07 +0000 (20:05 -0400)]
Fix the windows build
There was another warp implementation that needed to be removed.
This commit also addresses a number of compiler warnings
in passing.
Timm Bäder [Sun, 17 Mar 2019 06:20:53 +0000 (07:20 +0100)]
Doc comment fixup
Timm Bäder [Sat, 16 Mar 2019 05:16:43 +0000 (06:16 +0100)]
popover: Always measure contents gizmo
Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
Timm Bäder [Sat, 16 Mar 2019 05:16:28 +0000 (06:16 +0100)]
popover: Don't try to compute_bounds of a NULL child
Matthias Clasen [Mon, 25 Mar 2019 14:15:27 +0000 (10:15 -0400)]
win32: Drop the warp implementation
We no longer support pointer warping.
Piotr Drąg [Mon, 25 Mar 2019 13:37:44 +0000 (14:37 +0100)]
Update Polish translation
Piotr Drąg [Mon, 25 Mar 2019 13:19:54 +0000 (14:19 +0100)]
Update POTFILES.in
Matthias Clasen [Sat, 23 Mar 2019 21:18:55 +0000 (17:18 -0400)]
Remove gdk_device_warp
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
Matthias Clasen [Sun, 24 Mar 2019 15:08:55 +0000 (11:08 -0400)]
Remove a dead file
We are not using this anymore.
Matthias Clasen [Sun, 24 Mar 2019 15:14:20 +0000 (11:14 -0400)]
color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
Benjamin Otte [Sat, 23 Mar 2019 02:08:03 +0000 (03:08 +0100)]
Fix compile warning